//
//  LYIntrodutionCell.m
//  artist
//
//  Created by Jay_Apple on 16/6/2.
//  Copyright © 2016年 viviyoo. All rights reserved.
//

#import "LYIntrodutionCell.h"
#import "LYIntoductionModel.h"

@interface LYIntrodutionCell ()<UITextViewDelegate>

@property (weak, nonatomic) IBOutlet UITextView *content;

@property (weak, nonatomic) IBOutlet UILabel *placeHolder;


@end

@implementation LYIntrodutionCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}


- (void)setModel:(LYIntoductionModel *)model{

    _model = model;
    
    self.placeHolder.text = _model.placeHolder;

}


- (void)setFrame:(CGRect)frame{


    frame.size.width -= 20;
    frame.origin.x = 10;
    
    [super setFrame:frame];

}

#pragma mark - textViewDelegate

- (void)textViewDidChangeSelection:(UITextView *)textView{
    
    self.placeHolder.hidden = textView.text.length > 0;
    self.model.content = textView.text;
    
}


@end
